package chap8;
//************************************************************************
//  PP8_6.java                  Author:GK
//
//  测试Account类和AccountCollection类。
//************************************************************************

public class PP8_6 {
    public static void main(String[] args) {
        AccountCollection accounts = new AccountCollection();

        accounts.addAccount("郭恺", 20172301, 3000);
        accounts.addAccount("王志伟",20172309,50000);
        accounts.addAccount("谭鑫",20172305,6666);
        accounts.addAccount("黄宇瑭",20172307,0);

        accounts.saveMoney("王志伟",20172309,8888);
        accounts.saveMoney("黄宇瑭",20172307,1);
        accounts.drawMoney("谭鑫",20172305,666);
        System.out.println(accounts);

        accounts.addInterest();
        System.out.println("本金加息： " + accounts);
    }
}
